import request from '@/utils/request'

export function getEmployeesSimples(){
    return request({
        url:'/sys/user/simple'
    })
}

// 获取员工列表表
export function getEmployees(page,size){
    return request({
        url:'sys/user',
        params:{page,size}
    })
}

export function addEmployee(data){
    return request({
        method:'post',
        url:'/sys/user',
        data
    })
}

export function delEmployee(id){
    return request({
        method:'delete',
        url:`/sys/user/${id}`,

    })
}

export function addEmployeeBatch(data){
    return request({
        method:'post',
        url:`/sys/user/batch`,
        data
    })
}

export function saveUserDetailById(data){
    return request({
        method:'put',
        url:`/sys/user/${data.id}`,
        data
    })
}

export function assignRoles(data){
    return request({
        url:'/sys/user/assignRoles',
        data,
        method:'put'
    })
}